﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kovan.DAL.UserCenter;
using Kovan.Model.Entity.UserCenter;
using Kovan.Model.Parameter.UserCenter;

namespace Kovan.BLL.UserCenter
{
    public class BActApplication
    {
        DActApplication dal = new DActApplication();

        #region 当前类的实例
        private static readonly BActApplication Instances = new BActApplication();

        private BActApplication() { }

        public static BActApplication GetInstances()
        {
            return Instances;
        }
        #endregion

        /// <summary>
        /// 获取列表数据
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public IEnumerable<act_application> GetList(PApplication param)
        {
            return dal.GetList(param);
        }

        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        public act_application GetModel(int id)
        {
            return dal.GetModel(id);
        }

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model">实体</param>
        /// <returns></returns>
        public int Add(act_application model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        public int Delete(int id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int BatchDelete(IEnumerable<string> ids)
        {
            return dal.BatchDelete(ids);
        }

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model">实体</param>
        /// <returns></returns>
        public int Update(act_application model)
        {
            return dal.Update(model);
        }
    }
}
